home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-19
/
iritsm3s.zip
/
SOLID9.IRT
< prev
next >
Wrap
Text File
|
1991-09-16
|
1KB
|
56 lines
#
# Yet another simple 3D mechanical object.
#
# Created by Gershon Elber, Sep 89
#
tm = time(true);
save_mat = view_mat;
save_res = resolution;
resolution = 48;
b1 = box(vector(-0.3, -0.3, 0.0), 0.6, 0.6, 0.15);
c1 = cylin(vector(0.0, 0.0, 0.1), vector(0.0, 0.0, 0.65), 0.14);
s1 = sphere(vector(0.0, 0.0, 0.65), 0.3);
obj = b1 + c1 + s1;
free(b1);
free(c1);
free(s1);
interact(list(obj), false);
b2 = box(vector(-0.1, -0.4, 0.55), 0.2, 0.8, 0.5);
b3 = gbox(vector(0.0, -0.35, 0.63), vector(0.5, 0.0, 0.5),
vector(-0.5, 0.0, 0.5),
vector(0.0, 0.7, 0.0));
boxes = b2 + b3;
free(b2);
free(b3);
view(list(boxes), false);
obj = obj - boxes;
free(boxes);
view(list(obj), true);
c2 = cylin(vector(0.0, 0.0, -0.1), vector(0.0, 0.0, 1.2), 0.08);
c3 = cylin(vector(0.0, -0.3, 0.25), vector(0.0, 0.6, 0.0), 0.05);
view(list(c2, c3), false);
obj = obj - c2 - c3;
free(c2);
free(c3);
view(list(obj), true);
final = convex(obj);
free(obj);
tm = time(false);
tm; # In Seconds
interact(list(final), false);
save("solid9", list(view_mat,final));
free(final);
resolution = save_res;
view_mat = save_mat;